<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021-3-16
 * Time: 21:39
 */

namespace app\admin\controller;


use think\facade\Env;

class Upload extends Base
{
    public function logo()
    {
        $fileName = uploadFile(Env::get('root_path') . '/public/static/images', 'logo.png');
        
        return ['code' => 1, 'msg' => '', 'data' => ['src' => request()->domain() . DIRECTORY_SEPARATOR . 'static/images' . DIRECTORY_SEPARATOR . $fileName]];
    }
}